package cn.zzuli.test;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.google.gson.Gson;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class loginActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

               Gson gson=new Gson();
       String html="{\"data\":6666,\"errorCode\":0,\"errorMsg\":\"\"}";
        String html1="{\"data\":6666,\"errorCode\":0,\"errorMsg\":333}";
        login login = gson.fromJson(html1, login.class);
         int  code = (int) login.getErrorCode();
         String  data =(String) login.getData();
        String  message =(String) login.getErrorMsg();
        System.out.println(code);
        System.out.println(data);
        System.out.println(message);

    }

}